<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
</head>
<body>
<div id="app-1">
    {{ message }}
</div>

<div id="app-2">
  <span v-bind:title="message">
    鼠标悬停几秒钟查看此处动态绑定的提示信息！
  </span>
</div>

<div id="app-3">
    <h1 v-if="type==='A'">A</h1>
    <h1 v-else-if="type==='B'">B</h1>
    <h1 v-else>C</h1>
</div>

<div id="app-4">
<li v-for="item in items">
    {{item.message}}
</li>
</div>

<div id="app-5">
    <button v-on:click="sayHi">点我</button>
</div>
<script type="text/javascript">
    let app = new Vue({
        el: '#app-1',
        data: {
            message: 'Hello Vue!'
        }
    })

    var app2 = new Vue({
        el: '#app-2',
        data: {
            message: '页面加载于 ' + new Date().toLocaleString()
        }
    })

    var app3 = new Vue({
        el: '#app-3',
        data: {
            type:'a'
        }
    })

    var app4 = new Vue({
        el: '#app-4',
        data: {
            items:[
                {message:'张三'},
                {message:'李四'},
            ]
        }
    });

    var app5 = new Vue({
        el: '#app-5',
        data: {message:"hello vue!"},
        methods:{
                sayHi:function (event) {
                        alert(this.message);
                }
        }
    })
</script>
</body>
</html>